package service;

import java.util.List;

import dao.RiskDao;
import entity.Risk;

public class RiskService {
	private RiskDao riskDao;
	
	public RiskService(){
		riskDao=new RiskDao();
	}
	
	public void createRisk(Risk r){
		riskDao.write(r);
	}
	
	public List<Risk> getRelatedRisk(int userId){
		return riskDao.readAll(userId);
	}
	
	public void updateRisk(int id, String description){
		riskDao.updateRisk(id, description);
	}
}
